<?php

namespace Resources\Form;

use Zend\Form\Form;

class SessionForm extends Form {
    public function __construct($name = null)
    {
        parent::__construct('register');
        $this->setAttribute('method', 'post');
        $this->setAttribute('class', 'form-horizontal');
        $this->setInputFilter(new SessionFormFilter());
    
        $this->add(array(
            'name' => 'ID',
            'type' => 'Hidden',
            array(
                'default' => '0'
            )
        ));
    
        $this->add(array(
            'name' => 'TOPIC',
            'options' => array(
                'label' => 'Topic'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control'
            )
        ));
    
        $this->add(array(
    
            'name' => 'SUMMIT_YEAR',
            'type' => 'date',
            'options' => array(
                'label' => 'Sumit Year',
                'format' => 'Y'
            ),
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em',
                'min' => '2000',
                'max' => '2100',
                'step' => '1'
            ) // minutes; default step interval is 1 min
    
        ));
    
        $this->add(array(
            'name' => 'MEDIUM',
            'options' => array(
                'label' => 'Medium'
            ),
            'type' => 'Select',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em',
                'multiple', true,
                'options' => array(
                    '0' => '--select--',
                    '1' => 'Sinhala',
                    '2'=> 'Tamil',
                    '3' => 'English'
                )
            )
        ));
    
        $this->add(array(
            'name' => 'DURATION',
            'options' => array(
                'label' => 'Duration'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control'
            )
        ));
    
        $this->add(array(
            'name' => 'SECTOR',
            'options' => array(
                'label' => 'Suitability'
            ),
            'type' => 'Select',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em',
                'multiple', true,
                'options' => array(
                    '0' => '--select--',
                    '1' => 'Cooperate',
                    '2'=> 'Church or Non profit',
                    '3' => 'Both'
                )
            )
        ));
    
        $this->add(array(
            'name' => 'OVERVIEW',
            'options' => array(
                'label' => 'Overview ',
        
            ),
            'type' => 'Textarea',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'resize: none'
            )
        ));
        
        $this->add(array(
            'name' => 'REMARK',
            'options' => array(
                'label' => 'Remark ',
        
            ),
            'type' => 'Textarea',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'resize: none'
            )
        ));
      
        $this->add(array(
            'name' => 'FK_SPEAKER_ID',
            'options' => array(
                'label' => 'Speaker',
                'empty_option' => '--select an speaker--',
                'disable_inarray_validator' => true
            ),
            'type' => 'Select',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em'
            )
        ));
    
      
        $this->add(array(
            'name' => 'BTNSAVE',
            'options' => array(
                'label' => ''
            ),
            'attributes' => array(
                'value' => 'Save',
                'class' => 'btn btn-default'
            ),
            'type' => 'submit',
            'id' => 'submitbutton'
        ));
    
        $this->add(array(
            'name' => 'BTNCLEAR',
            'options' => array(
                'label' => ''
            ),
            'attributes' => array(
                'value' => 'Cancel',
                'class' => 'btn btn-default'
            ),
            'type' => 'submit',
            'id' => 'submitbutton'
        ));
    
        // We could also define the input filter here, or
        // lazy-create it in the getInputFilter() method.
    }
}